package com.molichuxing.services.business.service;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.exception.BizException;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.business.dto.request.create.PaymentBizCreateDto;
import com.molichuxing.services.business.dto.request.modify.AioPayResultBizModifyDto;
import com.molichuxing.services.business.dto.response.NotifyBizDto;
import com.molichuxing.services.business.dto.response.PaymentBizDto;
import com.molichuxing.services.business.dto.response.PaymentDownloadBizDto;
import com.molichuxing.services.business.dto.response.PaymentRecordBizDto;
import com.molichuxing.services.property.PaymentChannelEnum;
import com.molichuxing.services.property.PaymentCostTypeEnum;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 支付组合
 * </p>
 *
 * @author zhaopenghui
 * @since 2019-08-21
 */
public interface PaymentBizService extends RootService {

    /**
     * 收款查询
     *
     * @param params
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    public Paged<PaymentBizDto> getPaymentPage(Map<String, Object> params, Integer pageNum, Integer pageSize)
            throws Exception;


    /**
     * 保证金
     *
     * @param params
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    public Paged<PaymentBizDto> getDepositPage(Map<String, Object> params, Integer pageNum, Integer pageSize)
            throws Exception;


    /**
     * 用户支付记录
     *
     * @param userId 用户id
     * @return
     */
    public List<PaymentRecordBizDto> getPaymentRecord(Integer userId);

    /**
     * 支付-预支付单
     *
     * @param createDto
     * @return
     * @throws Exception
     * @throws BizException
     */
    public String getOrderPay(PaymentBizCreateDto createDto) throws BizException, Exception;

    /**
     * 支付回调修改
     *
     * @param notifyParam
     * @param paymentChannel
     * @return
     * @throws BizException
     * @throws Exception
     */
    public NotifyBizDto modifyNotify(Map<String, String> notifyParam, PaymentChannelEnum paymentChannel)
            throws BizException, Exception;

    /**
     * 智能终端支付结果
     *
     * @param modifyDto
     * @return
     * @throws BizException
     * @throws Exception
     */
    public NotifyBizDto modifyAioResult(AioPayResultBizModifyDto modifyDto) throws BizException, Exception;

    /**
     * 查询支付结果
     *
     * @param orderCode  订单号
     * @param scheduleId 排期id
     * @param costType   费用类型
     * @return
     * @throws BizException
     * @throws Exception
     */
    public NotifyBizDto getPayResult(Long orderCode, Integer scheduleId, PaymentCostTypeEnum costType)
            throws BizException, Exception;

    /**
     * 查询收款台账导出数据
     *
     * @param selectParams
     * @return
     */
    public List<PaymentDownloadBizDto> getReceiptStandingBookDownload(Map<String, Object> selectParams);

    /**
     * 查询收款台账导出数据条数
     *
     * @param selectParams
     * @return
     */
    public Long getReceiptStandingBookDownloadCount(Map<String, Object> selectParams);
}
